/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package fr.inria.openmath.omapi.implementation;

/**
 *
 * @author Mr.Sam
 */

import fr.inria.openmath.omapi.*;

/**
 * Defines accessor/mutators for this kind of node.
 */
public class FloatNodeImpl extends NodeImpl implements FloatNode {

    int base;

    double value;

    public FloatNodeImpl (double value) {
        this.base = 10;
        this.value = value;
        this.type = OM_FLOAT64;
    }

    public FloatNodeImpl (double value, int base) {
        this.base = base;
        this.value = value;
    }

    public String toString() {
        return typeToString(type) + "(" + value + ")";
    }

    public void setPreferedBase(int base) {}

    public int getPreferedBase() {
        return base;
    }

    public void setValue(double value) {
        this.value = value;
    }

    public double getValue() {
        return value;
    }

}
